//
// Created by pzw on 23-12-25.
//

#include <qpushbutton.h>
#include <qapplication.h>
#include <iostream>

#include "QtSignal.h"

QtSignal::QtSignal(QWidget *parent, QFlags<Qt::WindowType> name)
        : QMainWindow(parent, name) {
    QPushButton *button = new QPushButton("Click Me!", this);
    button->setGeometry(100, 60, 140, 40);
    // 主要函数
    connect(button, SIGNAL(clicked()), this, SLOT(UserClicked()));
    resize(350, 200);
}

QtSignal::~QtSignal() {

}

void QtSignal::UserClicked() {
    std::cout << "clicked!" << std::endl;
}
